package com.sy.service.Impl;

import com.sy.entity.Page;
import com.sy.mapper.EditMapper;
import com.sy.service.EditService;
import com.sy.vo.EditVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zbbstart
 * @date 2021/1/18 - 17:02
 */
@Service
public class EditServiceImpl implements EditService {
    @Autowired
    private EditMapper editMapper;
    @Override
    public boolean addPage(EditVo editVo) {
        return editMapper.addPage(editVo);
    }

    @Override
    public List<Page> getPagesByUserId(Integer userId) {
        return editMapper.getPagesByUserId(userId);
    }

    @Override
    public Page getPageByPageId(Integer pageId) {
        return editMapper.getPageByPageId(pageId);
    }

    @Override
    public boolean delPageByPageId(Integer id, Integer userId) {
        return editMapper.delPageByPageId(id,userId);
    }
}
